--TEST--
Fix GH-12143: Optimize round
--FILE--
<?php
echo "HALF_UP\n";
var_dump(round(1.700000000000145, 13, PHP_ROUND_HALF_UP));
var_dump(round(-1.700000000000145, 13, PHP_ROUND_HALF_UP));
var_dump(round(123456789012344.5, -1, PHP_ROUND_HALF_UP));
var_dump(round(-123456789012344.5, -1, PHP_ROUND_HALF_UP));
echo "\n";

echo "HALF_DOWN\n";
var_dump(round(1.70000000000015, 13, PHP_ROUND_HALF_DOWN));
var_dump(round(-1.70000000000015, 13, PHP_ROUND_HALF_DOWN));
var_dump(round(123456789012345.0, -1, PHP_ROUND_HALF_DOWN));
var_dump(round(-123456789012345.0, -1, PHP_ROUND_HALF_DOWN));
var_dump(round(1.500000000000001, 0, PHP_ROUND_HALF_DOWN));
var_dump(round(-1.500000000000001, 0, PHP_ROUND_HALF_DOWN));
echo "\n";

echo "HALF_EVEN\n";
var_dump(round(1.70000000000025, 13, PHP_ROUND_HALF_EVEN));
var_dump(round(-1.70000000000025, 13, PHP_ROUND_HALF_EVEN));
var_dump(round(1.70000000000075, 13, PHP_ROUND_HALF_EVEN));
var_dump(round(-1.70000000000075, 13, PHP_ROUND_HALF_EVEN));
var_dump(round(12345678901234.5, 0, PHP_ROUND_HALF_EVEN));
var_dump(round(-12345678901234.5, 0, PHP_ROUND_HALF_EVEN));
var_dump(round(1.500000000000001, 0, PHP_ROUND_HALF_EVEN));
var_dump(round(-1.500000000000001, 0, PHP_ROUND_HALF_EVEN));
echo "\n";

echo "HALF_ODD\n";
var_dump(round(1.70000000000025, 13, PHP_ROUND_HALF_ODD));
var_dump(round(-1.70000000000025, 13, PHP_ROUND_HALF_ODD));
var_dump(round(1.70000000000075, 13, PHP_ROUND_HALF_ODD));
var_dump(round(-1.70000000000075, 13, PHP_ROUND_HALF_ODD));
var_dump(round(12345678901233.5, 0, PHP_ROUND_HALF_ODD));
var_dump(round(-12345678901233.5, 0, PHP_ROUND_HALF_ODD));
var_dump(round(1.500000000000001, 0, PHP_ROUND_HALF_ODD));
var_dump(round(-1.500000000000001, 0, PHP_ROUND_HALF_ODD));
?>
--EXPECT--
HALF_UP
float(1.7000000000001)
float(-1.7000000000001)
float(123456789012340)
float(-123456789012340)

HALF_DOWN
float(1.7000000000001)
float(-1.7000000000001)
float(123456789012340)
float(-123456789012340)
float(2)
float(-2)

HALF_EVEN
float(1.7000000000002)
float(-1.7000000000002)
float(1.7000000000008)
float(-1.7000000000008)
float(12345678901234)
float(-12345678901234)
float(2)
float(-2)

HALF_ODD
float(1.7000000000003)
float(-1.7000000000003)
float(1.7000000000007)
float(-1.7000000000007)
float(12345678901233)
float(-12345678901233)
float(2)
float(-2)
